package cn.iocoder.yudao.module.reading.controller.app.favorite.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 收藏 Response VO
 *
 * @author 李晨
 */
@Schema(description = "用户 APP - 收藏 Response VO")
@Data
public class FavoriteRespVO {

    @Schema(description = "收藏ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long id;

    @Schema(description = "收藏类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "book_set")
    private String favoriteType;

    @Schema(description = "收藏对象ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long targetId;

    @Schema(description = "收藏备注", example = "很喜欢这个绘本集")
    private String remark;

    @Schema(description = "收藏时间", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024-01-06T10:30:00")
    private LocalDateTime createTime;

    @Schema(description = "收藏对象信息")
    private FavoriteTargetVO target;

    @Schema(description = "收藏对象信息")
    @Data
    public static class FavoriteTargetVO {
        @Schema(description = "对象标题", example = "牛津树1级")
        private String title;

        @Schema(description = "对象封面", example = "https://example.com/cover.jpg")
        private String cover;

        @Schema(description = "对象描述", example = "牛津阅读树第一级别")
        private String description;

        @Schema(description = "语言类型", example = "en")
        private String language;

        @Schema(description = "时长（音频专用）", example = "180")
        private Integer duration;

        @Schema(description = "绘本数量（绘本集专用）", example = "6")
        private Integer bookCount;
    }

}
